tools/libxc: Set max_elem to zero in xc_lockprof_query_number()
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 13 Aug 2014 16:40:38 +0000 (12:40 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 26 Aug 2014 21:03:17 +0000 (22:03 +0100)
commit355ed81e1a6ec3987194023d2538a3c4e5d1619d
tree9957e24fc52e6ebe82f3cf32ae6ae1690b29676b
parent95f7ed9abb71b897c70893aaa9c4f413aa4b487e
tools/libxc: Set max_elem to zero in xc_lockprof_query_number()

If max_elem is not zero then hypervisor's spinlock_profile_ucopy_elem()
will attempt to copy profile data into user's data buffer. Since this
buffer is explicitly set to (the equivalent of) NULL the copy will fail,
causing xenlockprof to fail as well.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_misc.c